//@author A0083934X

package Main;

import java.util.Stack;


public class Redo {
	private Stack<DataForRedo> redostack;
	
	public Redo(){
		redostack=new Stack<DataForRedo>();
	}
	
	public void addRedo(String name, String t){
		DataForRedo data = new DataForRedo(name,t);
		redostack.push(data);
	}
	
	public void addRedo(Item i, String t){
		DataForRedo data=new DataForRedo(i, t);
		redostack.push(data);
	}
	public void addRedo(String oldn, String newn, String t){
		DataForRedo data = new DataForRedo (oldn, newn, t);
		redostack.push(data);
	}
	
	public void addRedo(Item i, String t, int ind){
		DataForRedo data = new DataForRedo(i, t, ind);
		redostack.push(data);
	}
	
	public void addRedo(Item old, Item _new, String t){
		DataForRedo data=new DataForRedo(old, _new, t);
		redostack.push(data);
	}
	
	public DataForRedo RedoAction(){
		return (redostack.pop());	
	}
	
	public boolean check(){
		return redostack.isEmpty();
	}
}
